#include<bits/stdc++.h>
using namespace std;
const long long N=1e5+5;
long long a[N];
inline long long read();
inline void solve(){
	long long n=read();
	for(long long i=1;i<=n;++i){
		a[i]=read();
	}
	sort(a+1,a+n+1);
	long long l=1,r=1,cnt=0;
	for(long long i=1;i<=n;++i){
		while(a[l]==a[r])r++;
		if(a[l]<a[r]){
			l++,r++,cnt++;
			continue;
		}
	}
	printf("%lld\n",n-cnt);
}
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	long long T=1;
//	long long T=read();
	while(T--)solve();
	return 0;
}
inline long long read(){
	long long x;scanf("%lld",&x);
	return x;
}
